﻿namespace Quail.Silverlight
{
    public partial class SlvTabControl : SlvControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SlvTabControl"/> class.
        /// </summary>
        public SlvTabControl()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SlvTabControl"/> class.
        /// </summary>
        /// <param name="container">The container for the control.</param>
        /// <param name="selector">The selector.</param>
        public SlvTabControl(SlvControlContainer container, string selector)
            : base(container, selector)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SlvTabControl"/> class.
        /// </summary>
        /// <param name="control">The control.</param>
        public SlvTabControl(SlvControl control)
            : base(control)
        {
        }

        /// <summary>
        /// Gets or sets the index of the selected tab.
        /// </summary>
        /// <value>The index of the selected tab.</value>
        public int SelectedIndex
        {
            get
            {
                return int.Parse(GetPropertyValue("SelectedIndex"));
            }

            set
            {
                SetPropertyValue("SelectedIndex", value.ToString());
            }
        }
    }
}
